WindowInsetsControllerCompat
Provide simple controls of windows that generate insets. For SDKs >= 30, this class is a simple wrapper around WindowInsetsController. For lower SDKs, this class aims to behave as close as possible to the original implementation.
Types
Link copied to clipboard
interface OnControllableInsetsChangedListener
Listener to be notified when the set of controllable WindowInsetsCompat.Type controlled by a WindowInsetsController changes.
Properties
Link copied to clipboard
The default option for setSystemBarsBehavior: Window would like to remain interactive when hiding navigation bars by calling hide or setInsetsAndAlpha.
Link copied to clipboard
Option for setSystemBarsBehavior: Window would like to remain interactive when hiding navigation bars by calling hide or setInsetsAndAlpha.
Link copied to clipboard
Option for setSystemBarsBehavior.
Link copied to clipboard
Option for setSystemBarsBehavior: Window would like to remain interactive when hiding navigation bars by calling hide or setInsetsAndAlpha.
Functions
Link copied to clipboard
open fun addOnControllableInsetsChangedListener(@NonNull listener: WindowInsetsControllerCompat.OnControllableInsetsChangedListener)
Adds a WindowInsetsController.OnControllableInsetsChangedListener to the window insets controller.
Link copied to clipboard
open fun controlWindowInsetsAnimation(types: Int, durationMillis: Long, @Nullable interpolator: Interpolator, @Nullable cancellationSignal: CancellationSignal, @NonNull listener: WindowInsetsAnimationControlListenerCompat)
Lets the application control window inset animations in a frame-by-frame manner by modifying the position of the windows in the system causing insets directly using setInsetsAndAlpha in the controller provided by the given listener.
Link copied to clipboard
Retrieves the requested behavior of system bars.
Link copied to clipboard
Checks if the foreground of the navigation bar is set to light.
Link copied to clipboard
Checks if the foreground of the status bar is set to light.
Link copied to clipboard
open fun removeOnControllableInsetsChangedListener(@NonNull listener: WindowInsetsControllerCompat.OnControllableInsetsChangedListener)
Removes a WindowInsetsController.OnControllableInsetsChangedListener from the window insets controller.
Link copied to clipboard
If true, changes the foreground color of the navigation bars to light so that the items on the bar can be read clearly.
Link copied to clipboard
If true, changes the foreground color of the status bars to light so that the items on the bar can be read clearly.
Link copied to clipboard
Controls the behavior of system bars.
Link copied to clipboard
open fun
Wrap a WindowInsetsController into a WindowInsetsControllerCompat for compatibility purpose.